package com.quectel.core.module.forum.entity.mongo;

import com.quectel.core.constants.MongoCollectionConstants;
import com.quectel.util.client.mongo.MongoBaseModel;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.util.Date;

/**
 * @author zhangheng
 * @email nolan.zhang@quectel.com
 * @date 2023/5/8 15:52
 * @description 帖子点赞
 */
@Data
@Document(MongoCollectionConstants.FORUM_MSG)
@CompoundIndex(name = "idx_user_operator", def = "{'mobileUserId': 1,'operatorId': 1}", background = true)
@CompoundIndex(name = "idx_user_operated_person", def = "{'mobileUserId': 1,'operatedPersonId': 1}", background = true)
public class ForumMsgModel implements MongoBaseModel {
    /**
     * id
     */
    @MongoId
    private Long id;

    /**
     * mobileUserId
     */
    private Long mobileUserId;

    /**
     * 操作人
     */
    private Long operatorId;

    /**
     * 被操作人
     */
    private Long operatedPersonId;

    /**
     * 论坛消息类型 常量值
     *
     * @see
     */
    private Byte forumMsgType;

    /**
     * 消息id
     */
    private Long businessId;

    /**
     * 状态 0未读 1已读
     */
    private Byte readStatus;

    /**
     * 消息创建时间
     */
    private Date createTime;


}
